

package net.pvp;

import java.util.*;

import net.pvp.item.*;
import net.pvp.buff.*;

public class PVPCharacter {

    /**
     * This object holds the base character data, i.e starting life,dex,etc.
     * It holds the base stats for items/spells that need to know base stats
     * not actual stats. This also holds the data that should get saved from
     * one fight to the next.
     */
    protected CharData baseData;

    /* These are the player vars.              */
    /* These values are calculated based on    */
    /* items, spells, etc that the char has.   */

    /* Thses are the static player stats.      */
    protected int dex;
    protected int str;
    protected int intl;
    protected int stam;

    protected int life;
    protected int mana;
    protected int armor;

    /* These are the turn resetables.          */
    protected int attacks;
    protected int castPoints;

    /* These are the turn based rates.         */
    protected int lifeRegen;
    protected int manaRegen;
    protected int attackRegen;
    protected int castRegen;

    /* This is a list of buffs. */
    List<net.pvp.buff.Buff> buffs;

    public PVPCharacter(CharData data){
	baseData = data;
	setBaseStats();
	calcActualCharData();
    }

    protected void setBaseStats(){
	dex = baseData.dex;
	str = baseData.str;
	intl = baseData.intl;
	stam = baseData.stam;
	life = baseData.life;
	mana = baseData.mana;
	attacks = baseData.attacks;
	castPoints = baseData.castPoints;
	lifeRegen = baseData.lifeRegen;
	manaRegen = baseData.manaRegen;
	attackRegen = baseData.attackRegen;
	castRegen = baseData.castRegen;
    }

    public void calcActualCharData(){
	/* This does all the item based modifications of char stats. */
	baseData.leftHand.modify(this);
	baseData.rightHand.modify(this);
	baseData.offHand.modify(this);
	baseData.head.modify(this);
	baseData.chest.modify(this);
	baseData.shoulders.modify(this);
	baseData.wrists.modify(this);
	baseData.hands.modify(this);
	baseData.waist.modify(this);
	baseData.legs.modify(this);
	baseData.feet.modify(this);

	/* Now go through the buff list and run those mods. */

	
    }

}